#include "stdafx.h"
#include "base/Task.h"
#include "base/thread/MessageLoop.h"

namespace xBase
{
    VOID CThreadQuitTask::Run()
    {
        CxMessageLoop * pMessageLoop = CxMessageLoop::Current();
        if (pMessageLoop)
        {
            pMessageLoop->Quit();
        }
    }

    VOID CThreadQuitTask::Destroy()
    {
        delete this;
    }
}